<?php
/**
 * Created by PhpStorm.
 * User: tangmusen
 * Date: 2017/9/15
 * Time: 10:03
 */
namespace app\common\validate;

use think\Validate;
class Reg extends Validate
{
    protected $rule = [
        'mobile'   =>  'require|number',
        'code'     =>  'require',
        'password' =>  'require|min:6',
    ];

    protected $message = [
        'mobile.require'   =>  '请输入手机号',
        'mobile.number'    =>  '手机号码只能为数字',
        'code.require'     =>  '请输入验证码',
        'password.require' =>  '请输入密码',
        'password.min'     =>  '密码至少6位',
    ];
    protected $scene = [
        'login'     =>  ['mobile','password'],
        'send'     =>  ['mobile'],
        'forget'   =>  ['mobile'  =>  'require'],
        'forgets'  =>  ['mobile'  =>  'require','code','password'],
    ];

}